//
//  MKCharstTableViewCell.m
//  ManKeCartoon
//
//  Created by dllo on 15/10/21.
//  Copyright © 2015年 ManKe. All rights reserved.
//

#import "MKCharstTableViewCell.h"
#import "MKBaseHeader.h"
@implementation MKCharstTableViewCell
-(instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier
{
    if (self = [super initWithStyle:style reuseIdentifier:reuseIdentifier]) {
        
        self.charstImage = [[UIImageView alloc]initWithFrame:CGRectMake(10*WIDTH,10*HEIGHT, 90*WIDTH, 110*HEIGHT)];
        [self.contentView addSubview:self.charstImage];
        
        
        self.charstTitle = [[UILabel alloc]initWithFrame:CGRectMake(110*WIDTH, 10*HEIGHT, 150*WIDTH, 40*HEIGHT)];
        self.charstTitle.font = [UIFont boldSystemFontOfSize:19];
        [self.contentView addSubview:self.charstTitle];
   
    
        self.lastup = [[UILabel alloc]initWithFrame:CGRectMake(110*WIDTH, 35*HEIGHT, 100*WIDTH, 40*HEIGHT)];
        self.lastup.font = [UIFont systemFontOfSize:14];
        [self.contentView addSubview:self.lastup];
    
    
        self.type = [[UILabel alloc]initWithFrame:CGRectMake(110*WIDTH, 55*HEIGHT, 100*WIDTH, 40*HEIGHT)];
        self.type.font = [UIFont systemFontOfSize:14];
        [self.contentView addSubview:self.type];
        
        
        self.brief_intrd = [[UILabel alloc]initWithFrame:CGRectMake(110*WIDTH, 80*HEIGHT, 200*WIDTH, 40*HEIGHT)];
        self.brief_intrd.font = [UIFont systemFontOfSize:14];
        [self.contentView addSubview:self.brief_intrd];
        
    
        self.charstNumber = [[UILabel alloc]initWithFrame:CGRectMake(320*WIDTH, 30*HEIGHT, 100*WIDTH, 40*HEIGHT)];
        self.charstNumber.font = [UIFont boldSystemFontOfSize:25];
        [self.contentView addSubview:self.charstNumber];
    
    }
    return self;
}

-(void)getcell:(MKChartsModel *)model
{
    self.charstTitle.text = model.title;
    
    self.lastup.text = [NSString stringWithFormat:@"更新到%@",model.lastup];
    
    self.brief_intrd.text = model.brief_intrd;
    
    self.type.text = model.type;
    
    NSURL *url = [NSURL URLWithString:model.cover_url];
    [self.charstImage sd_setImageWithURL:url];

}




- (void)awakeFromNib {
    // Initialization code
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

@end
